﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class PrivilegeFacade
    {
        public string Save(Privilege Privileges)
        {
            PrivilegeController cont = new PrivilegeController();
            return cont.Save(Privileges);
        }

        public string Delete(Privilege Privileges)
        {
            PrivilegeController cont = new PrivilegeController();
            return cont.Delete(Privileges);
        }

        public IList<Privilege> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<Privilege> Privileges = new List<Privilege>();
            PrivilegeController cont = new PrivilegeController();
            Privileges = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return Privileges;
        }

        public Privilege GetPrivilegeByID(int ID)
        {
            Privilege Privileges = new Privilege();
            PrivilegeController cont = new PrivilegeController();
            Privileges = cont.GetPrivilegeByID(ID);
            return Privileges;
        }

        public Privilege GetPrivilegeByDescription(string Description)
        {
            Privilege Privileges = new Privilege();
            PrivilegeController cont = new PrivilegeController();
            Privileges = cont.GetPrivilegeByDescription(Description);
            return Privileges;
        }
    }
}